package com.jzo2o.customer.controller.agency;


import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 机构认证信息表 前端控制器
 * </p>
 *
 * @author Echo
 * @since 2025-03-07
 */
@RestController("agencyCertificationController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端-机构人员申请认证相关接口")
@RequiredArgsConstructor
public class AgencyCertificationController {
    private final IAgencyCertificationService agencyCertificationService;

    @PostMapping()
    @ApiOperation("机构人员提交认证申请")
    public void saveCertification(@RequestBody AgencyCertificationAuditAddReqDTO dto) {
        agencyCertificationService.saveCertification(dto);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询驳回原因")
    public RejectReasonResDTO queryRejectedReason() {
        return agencyCertificationService.queryRejectedReason();
    }
}
